#ifndef MODBUSCOMM_H
#define MODBUSCOMM_H
#include <stdint.h>
enum  OperationType {
    ReadRegisters,
    WriteRegisters,
    ReadCoils,
    WriteCoils,
    WriteCoil,
    NONE_OP
    // 添加其他类型...
};
enum  ModbusMode {
    RTU,
    TCP
};
typedef struct
{
    uint8_t device_id;
    uint8_t  length;
    uint8_t  date_8[256];
    uint16_t address;
    uint16_t date[128];
    uint8_t cmdType;
    int64_t start_tick;
    int asktime;
    int  opType;
    bool   opResult;
}ModbusRequest;

#endif // MODBUSCOMM_H
